<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp" %>

<form:form commandName="message" cssClass="form-horizontal" role="form" onsubmit="return false">
    <div class="form-group">
        <label class="col-sm-2 control-label no-padding-right" for="taskName">任务名称</label>
        <div class="col-sm-3">
            <input type="text" name="taskName" id="taskName" value="${message.taskName}"
                   class="form-control" readonly>
        </div>
        <label class="col-sm-2 control-label no-padding-right" for="content">反馈单位</label>
        <div class="col-sm-3">
            <input type="text" name="taskName" id="content" value="${message.sendDeptName}"
                   class="form-control" readonly>
            <%--<textarea rows="5" id="content" name="content"--%>
                      <%--class="form-control" readonly>${message.sendDeptName}</textarea>--%>
        </div>
    </div>

    <div class="form-group">

    </div>
    <div class="form-group">
        <label class="col-sm-2 control-label no-padding-right" for="leader">消息类型</label>
        <div class="col-sm-3">
            <input type="text" name="leader" id="leader" value="${message.type == 1 ?  "反馈" : "撤销申请"}"
                   class="form-control" readonly>
        </div>
        <label class="col-sm-2 control-label no-padding-right" for="operator">读取状态</label>
        <div class="col-sm-3">
            <input type="text" name="operator" id="operator" value="${message.state == 1 ? "已读" : "未读"}"
                   class="form-control" readonly>
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-2 control-label no-padding-right">消息内容</label>
        <div class="col-sm-8">
            <textarea rows="3" class="form-control" readonly>${message.content}</textarea>
        </div>
    </div>
    <div class="form-group">
        <div  class="col-sm-offset-2 col-sm-2">
            <button class="btn btn-success" onclick="detail()">任务详情</button>
        </div>
    </div>
    <input type="hidden" name="id" id="sysId" value="${message.sendId}">
</form:form>
<script src="<s:url value="/assets/js/chosen.jquery.js"></s:url>"></script>
<script src="<s:url value="/assets/js/ajaxfileupload.js"></s:url>"></script>
<script src="<s:url value="/assets/js/modal/modal.js"></s:url>"></script>

<script type="text/javascript">
    //下载按钮
    function downDetail(id) {
        var url = "/filesUpload/download/" + id;
        window.open(url);
    }

    $("#findBackList").click(function () {
        loadDialog({
            dialogTitle: '反馈信息列表',
            dialogUrl: "taskSend/backList/" + $('#sendId').text(),
            dialogFoot: '<button type="button" class="btn btn-default" data-dismiss="modal" id="showDetail">关闭</button>'
        });
    });


    // 详情
   function detail() {
        loadDialog({
            tableId: "#gridTable",
            dialogTitle: "任务详情",
            dialogUrl: "/taskSend/detail/"+$("#sysId").val(),
            dialogFoot: '<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>',
        });
    };
</script>
